﻿/**
 *
 * @file FITKAbaqusHDF5AdaptorBeamOrientation.h
 * @brief 读写HDF5文件的BeamOrientation类
 * @author fulipeng (fulipengqd@yeah.net)
 * @date 2024-07-05
 *
 */
#ifndef  _FITKABAQUSHDF5ADAPTORBEAMORIENTATION_H__
#define  _FITKABAQUSHDF5ADAPTORBEAMORIENTATION_H__

#include "FITKAbaqusIOHDF5API.h"
#include "FITKAbaqusHDF5AbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

 //前置声明
ForwardDeclarNS(Interface, FITKAbaBeamOrientation)

namespace IO
{
    /**
     * @brief HDF5 BeamOrientation 梁方向 读写适配器
     * @author fulipeng (fulipengqd@yeah.net)
     * @date 2024-07-05
     */
    class FITKABAQUSIOHDF5API FITKAbaqusHDF5AdaptorBeamOrientation : public FITKAbaqusHDF5AbstractAdaptor
    {
    public:
        explicit FITKAbaqusHDF5AdaptorBeamOrientation() = default;
        virtual ~FITKAbaqusHDF5AdaptorBeamOrientation() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-05
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-05
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-05
         */
        bool adaptW() override;

        /**
         * @brief 读取线
         * @param wire 线
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-05
         */
        bool readBeamOrientation(Interface::FITKAbaBeamOrientation* beamO, H5::Group & h5Group);

        /**
         * @brief 写出线
         * @param wire 线
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-05
         */
        bool writeBeamOrientation(Interface::FITKAbaBeamOrientation* beamO, H5::Group & h5Group);

    };

    Register2FITKIOAdaptorFactory(HDF5, Interface::FITKAbaBeamOrientation, FITKAbaqusHDF5AdaptorBeamOrientation)

}

#endif
